export const url2obj = url => {
  const obj = {};
  const arr = url.split("?");
  if (arr.length > 1) {
    const params = arr[1].split("&");
    params.forEach(item => {
      const temp = item.split("=");
      obj[temp[0]] = temp[1];
    });
  }
  return obj;
};
